/* Copyright (c) 2025 Beijing Semidrive Technology Corporation
 * SPDX-License-Identifier: Apache-2.0
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/** *****************************************************************************************************
 *  \file     Gpt_PBCfg.c                                                                               *
 *  \brief    This file contains interface header for GPT MCAL config.                                  *
 *                                                                                                      *
 * <table>                                                                                              *
 * <tr><th>Date                 <th>Version                                                             *
 * <tr><td>2025-03-25 19:03:22      <td>1.0.0 R                                            *
 * </table>                                                                                             *
 *******************************************************************************************************/

#ifdef __cplusplus
extern "C" {
#endif

/********************************************************************************************************
 *                                      Include header files                                            *
 *******************************************************************************************************/
#include "Gpt_Cfg.h"

extern void GPT1_G1_IRQ(void);

#define GPT_START_SEC_CONST_UNSPECIFIED
#include "Gpt_MemMap.h"
#if(STD_ON == GPT_PREDEFTIMER_FUNCTIONALITY_API)
static const Gpt_PredefChannelConfigType Gpt_InitPredeftimer = {
    GPT_INDEX_BTM1,
    3,
};
#endif /*GPT_PREDEFTIMER_FUNCTIONALITY_API == STD_ON*/

static const Gpt_ChannelConfigType Gpt_InitChannelPB[1] =
{
    {
        .notification = &GPT1_G1_IRQ, /* Channel notification */
        .channelTickValueMax = (Gpt_ValueType)(4294967295U), /* Maximum ticks value*/
        .channelMode = (Gpt_ChannelModeType)(GPT_CH_MODE_CONTINUOUS), /* Timer mode:continous/one-shot */
        .hwChannelConfig =
        {
            .timerHwModule = (Gpt_HwModule)(GPT_INDEX_BTM1), /* hardware module ID */
            .hwChannel = (Gpt_HwChannel)(GPT_HW_TIMER_G1), /* GPT physical channel no. */
            .prescaler = (uint16)(23), /* Prescaler value */
            .notificationEnabled = (TRUE),
            .clockRef = (Gpt_ClockRefType)(GPT_CLOCKREF_XTAL),
            .redundancyCheck = FALSE
        },
        .gptCoreId = (uint8)0X0U
    },
};



const Gpt_ConfigType  GptChannelConfigSet =
{
    .channelCount = (Gpt_ChannelType)1U,
    .channelConfig = &Gpt_InitChannelPB,
#if(STD_ON == GPT_PREDEFTIMER_FUNCTIONALITY_API)
    .predefChannelConfig = &Gpt_InitPredeftimer,
#endif /*GPT_PREDEFTIMER_FUNCTIONALITY_API == STD_ON*/
};

#define GPT_STOP_SEC_CONST_UNSPECIFIED
#include "Gpt_MemMap.h"

#ifdef __cplusplus
}
#endif

/* End of file */
